<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>基本资料</title>
    <!-- 导入layui.css -->
    <link rel="stylesheet" href="/assets/lib/layui/css/layui.css" />
    <link rel="stylesheet" href="/assets/css/article/art_cate.css" />
  </head>
  <body>
    <!-- 添加文章类别 -->
    <form
      id="addForm"
      style="display: none"
      lay-filter="formUserInfo"
      class="layui-form"
      action=""
    >
      <input type="hidden" name="Id" />
      <!-- 1.分类名称 -->
      <div class="layui-form-item">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-block">
          <input
            type="text"
            name="name"
            required
            lay-verify="required|name"
            placeholder="请输入分类名称"
            autocomplete="off"
            class="layui-input"
          />
        </div>
      </div>
      <!-- 2.分类类别 -->
      <div class="layui-form-item">
        <label class="layui-form-label">分类类别</label>
        <div class="layui-input-block">
          <input
            type="text"
            name="alias"
            required
            lay-verify="required|alias"
            placeholder="请输入分类类别"
            autocomplete="off"
            class="layui-input"
          />
        </div>
      </div>
      <!-- 3.修改按钮 -->
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit lay-filter="formDemo">
            确认添加
          </button>
          <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
      </div>
    </form>
    <!-- 修改文章 -->
    <form
      lay-filter="formChange"
      id="changeFormList"
      style="display: none"
      class="layui-form"
      action=""
    >
      <!-- 0.分类id -->
      <input type="hidden" name="Id" />
      <!-- 1.分类名称 -->
      <div class="layui-form-item">
        <label class="layui-form-label">分类名称</label>
        <div class="layui-input-block">
          <input
            type="text"
            name="name"
            required
            lay-verify="required|name"
            placeholder="请输入分类名称"
            autocomplete="off"
            class="layui-input"
          />
        </div>
      </div>
      <!-- 2.分类类别 -->
      <div class="layui-form-item">
        <label class="layui-form-label">分类类别</label>
        <div class="layui-input-block">
          <input
            type="text"
            name="alias"
            required
            lay-verify="required|alias"
            placeholder="请输入分类类别"
            autocomplete="off"
            class="layui-input"
          />
        </div>
      </div>
      <!-- 3.修改按钮 -->
      <div class="layui-form-item">
        <div class="layui-input-block">
          <button class="layui-btn" lay-submit lay-filter="formDemo">
            确认修改
          </button>
        </div>
      </div>
    </form>
    <!--  -->
    <div class="layui-card">
      <div class="layui-card-header">
        <span>文章类别管理</span>
        <button
          id="add"
          type="button"
          class="layui-btn layui-btn-normal layui-btn-sm"
        >
          添加分类
        </button>
      </div>
      <div class="layui-card-body">
        <!-- 文章列表 -->
        <table class="layui-table">
          <colgroup>
            <col width="150" />
            <col />
            <col />
            <col width="200" />
            <col />
          </colgroup>
          <thead>
            <tr>
              <th>序号</th>
              <th>分类名称</th>
              <th>分类别名</th>
              <th>操作</th>
            </tr>
          </thead>
          <tbody>
            <tr hidden>
              <td>1</td>
              <td>像是一场</td>
              <td>人生就行</td>
              <td>
                <button
                  data_id=""
                  type="button"
                  class="changeList layui-btn layui-btn-xs"
                >
                  修改
                </button>
                <button
                  data_id=""
                  type="button"
                  class="delete layui-btn layui-btn-danger layui-btn-xs"
                >   
                  删除
                </button>
              </td>
            </tr>
          </tbody >
        </table>
      </div>
    </div>
    <!-- 导入layui.all.js -->
    <script src="/assets/lib/layui/layui.all.js"></script>
    <!-- 导入jQuery.js -->
    <script src="/assets/lib/jquery.js"></script>
    <!-- 导入axios.js -->
    <script src="/assets/lib/axios.js"></script>
    <!-- 导入common.js -->
    <script src="/assets/js/common.js"></script>
    <!-- 导入user_info.js -->
    <script src="/assets/js/article/art_cate.js"></script>
  </body>
</html>
